using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Runtime.Serialization;
using System.Xml;

namespace CDE_Model
{
    [Serializable]
    public class Document : XmlDocument
    {
        #region Fields

        private String _filePath;

        #endregion

        #region Properties

        /// <summary>
        /// Gets or sets the filepath of the document
        /// </summary>
        public String FilePath
        {
            get { return _filePath; }
            set { _filePath = value; }
        }

        #endregion

        #region Constructors

        public Document(Collection _collection)
        {
            _collection.AddDocument(this);
        }
        
        #endregion

        #region Methods

        /// <summary>
        /// Returns a string representation of the element
        /// NOT a raw XML File!!!
        /// </summary>
        public override string ToString()
        {
            return this.FirstChild.ToString();
        }

        #endregion

    }
}
